package com.ruoyi.park.service.impl;

import java.util.List;
import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.utils.SecurityUtils;
import com.ruoyi.park.mapper.MaRecordDetailMapper;
import com.ruoyi.park.domain.MaRecordDetail;
import com.ruoyi.park.service.IMaRecordDetailService;

/**
 * 记录关联物资Service业务层处理
 *
 * @author cjie
 * @date 2021-09-16
 */
@Service
public class MaRecordDetailServiceImpl implements IMaRecordDetailService {
    @Autowired
    private MaRecordDetailMapper maRecordDetailMapper;

    /**
     * 查询记录关联物资
     *
     * @param id 记录关联物资ID
     * @return 记录关联物资
     */
    @Override
    public MaRecordDetail selectMaRecordDetailById(String id) {
        return maRecordDetailMapper.selectMaRecordDetailById(id);
    }

    /**
     * 查询记录关联物资列表
     *
     * @param maRecordDetail 记录关联物资
     * @return 记录关联物资
     */
    @Override
    public List<MaRecordDetail> selectMaRecordDetailList(MaRecordDetail maRecordDetail) {
        return maRecordDetailMapper.selectMaRecordDetailList(maRecordDetail);
    }

    /**
     * 新增记录关联物资
     *
     * @param maRecordDetail 记录关联物资
     * @return 结果
     */
    @Override
    public int insertMaRecordDetail(MaRecordDetail maRecordDetail) {
        return maRecordDetailMapper.insertMaRecordDetail(maRecordDetail);
    }

    /**
     * 修改记录关联物资
     *
     * @param maRecordDetail 记录关联物资
     * @return 结果
     */
    @Override
    public int updateMaRecordDetail(MaRecordDetail maRecordDetail) {
        return maRecordDetailMapper.updateMaRecordDetail(maRecordDetail);
    }

    /**
     * 批量删除记录关联物资
     *
     * @param ids 需要删除的记录关联物资ID
     * @return 结果
     */
    @Override
    public int deleteMaRecordDetailByIds(String[] ids) {
        return maRecordDetailMapper.deleteMaRecordDetailByIds(ids);
    }

    /**
     * 删除记录关联物资信息
     *
     * @param id 记录关联物资ID
     * @return 结果
     */
    @Override
    public int deleteMaRecordDetailById(String id) {
        return maRecordDetailMapper.deleteMaRecordDetailById(id);
    }
}
